home *** CD-ROM | disk | FTP | other *** search
/ Inventor Labs: Technology / INVENTORLABS_TECHNOLOGY.BIN / pc / files / shared.cst / 00027_Script_PICT Funct Parent Script < prev    next >
Text File  |  1997-07-24  |  4KB  |  110 lines

  1. --o:Funct PICT
  2.  
  3. property pCastNum, pPictSprite, pStartSprite, pQTsprite, pSnd, pAreaHotSpotID
  4. property pCursorList, pRelatedHSid
  5.  
  6. global gModeManager, gInterfaceMgrObj, gAreaManagerObj, gUtilityObj
  7.  
  8. global gBellCastIndexlst, gGallerylCastIndexlst,gEdisonCastIndexlst,gWattCastIndexlst,gCompileMode
  9. global gInventorIndexNum, gMstrPictIndex, gActiveInventor, whatCastindex
  10. ------------------------------------------------------------------------------------------------------------------ò
  11. on birth me
  12.   
  13.   return ( me )
  14.   
  15. end birth
  16. ------------------------------------------------------------------------------------------------------------------ò
  17. on mInit me, aLineFromDataBase, aPICTsprite
  18.   
  19.   set pPictSprite = aPICTsprite
  20.   set pRelatedHSid = item 1 of aLineFromDataBase
  21.   
  22.   set CastIndex = value( "#" & item 4 of aLineFromDataBase )
  23.   set SndString = item 5 of aLineFromDataBase
  24.   
  25.   if gCompileMode then
  26.     
  27.     set pCastNum = the number of cast  ( item 4 of aLineFromDataBase )
  28.     addProp(whatCastindex, CastIndex, pCastNum)
  29.     
  30.     if not voidp( SndString ) and  (SndString <> empty) then
  31.       set SndNum = the number of cast (item 5 of aLineFromDataBase)
  32.       set SndIndex = value( "#" & SndString )
  33.       addProp(whatCastindex, SndIndex, SndNum)
  34.     end if
  35.     
  36.   else set whatCastindex = getprop( gMstrPictIndex,gActiveInventor)
  37.  
  38.   if (SndString <> empty) then 
  39.     set SndIndex = value( "#" & SndString )
  40.     set pSnd = getprop( whatCastindex , SndIndex)
  41.   else set pSnd = -1
  42.   set pCastNum = getprop( whatCastindex , CastIndex)
  43.   
  44.   set pCursorList = [21:#RETURN,22:#RETURN]
  45.   set pActive = false
  46.   
  47.   
  48. end mInit
  49. ------------------------------------------------------------------------------------------------------------------ò
  50. on mDiscloseFunctionalityType me
  51.   
  52.   return( #PICT )
  53.   
  54. end mDiscloseFunctionalityType
  55. ------------------------------------------------------------------------------------------------------------------ò
  56. on mActivate me
  57.   
  58.   puppetSprite pPictSprite, true
  59.   set the castnum of sprite pPictSprite = pCastNum
  60.   updatestage
  61.   
  62.   mClearToolMenu ( gInterfaceMgrObj )
  63.   mSetCursors(gUtilityObj,pCursorList)
  64.   
  65.   if (the shiftDown) then
  66.     if (pSnd = the number of cast "B1919PH.AIF") then
  67.       set Snd = getat([the number of cast "BEASTER1.AIF",the number of cast "BEASTER2.AIF"],random(2))
  68.       puppetsound 2, Snd
  69.     end if
  70.   else if (pSnd <> -1) then puppetsound 2, pSnd
  71.   
  72.   mUpdateReturnFrame(gUtilityObj,label("QTVR"))
  73.   mDisplayClickText(gInterfaceMgrObj, pRelatedHSid)
  74.   cursor -1
  75.   
  76. end mActivate
  77. ------------------------------------------------------------------------------------------------------------------ò
  78. on mClose me
  79.   
  80.   sound stop 2
  81.   cursor 4
  82.   --  global gQTVRobj
  83.   --  mUpdate( gQTVRobj )
  84.   
  85.   mClearText(gInterfaceMgrObj)
  86.   mUnSetCursors(gUtilityObj)
  87.   puppetSprite pPIctSprite, false  
  88.   
  89. end
  90. ------------------------------------------------------------------------------------------------------------------ò
  91. on mClickEvent me
  92.   
  93.   mClose( me )
  94.   mChangeMode(gModeManager, #Return)
  95.   
  96. end mClickEvent
  97. ------------------------------------------------------------------------------------------------------------------ò
  98. on mDisclose me
  99.   
  100.   -- put "PIct"
  101.   
  102. end 
  103. ------------------------------------------------------------------------------------------------------------------ò
  104. on mSetAreaHotSpotID me, aAreaHotSpotID
  105.   
  106.   set pAreaHotSpotID = aAreaHotSpotID
  107.   
  108. end mSetAreaHotSpotID
  109. ------------------------------------------------------------------------------------------------------------------ò
  110.